<!DOCTYPE html>
<html lang="zh-CN">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=no">
    <title>担保交友 - 个人详情</title>
    <!-- Bootstrap 5 CSS -->
    <link href="https://cdn.jsdelivr.net/npm/bootstrap@5.3.2/dist/css/bootstrap.min.css" rel="stylesheet">
    <!-- Font Awesome 图标 -->
    <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.5.1/css/all.min.css">
    
    <style>
        :root {
            --primary: #2563eb;
            --primary-light: #60a5fa;
            --primary-dark: #1d4ed8;
            --secondary: #f97316;
            --success: #10b981;
            --warning: #f59e0b;
            --danger: #ef4444;
            --text-primary: #1e293b;
            --text-secondary: #64748b;
            --text-light: #94a3b8;
            --bg-light: #f8fafc;
            --bg-white: #ffffff;
            --border-light: #e2e8f0;
            --border-medium: #cbd5e1;
            --radius: 10px;
            --shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
        }
        
        body {
            font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
            background-color: var(--bg-light);
            color: var(--text-primary);
            padding-top: 56px;
            padding-bottom: 60px;
        }
        
        /* 顶部导航 */
        .top-nav {
            position: fixed;
            top: 0;
            left: 0;
            right: 0;
            height: 56px;
            background-color: rgba(255, 255, 255, 0.95);
            backdrop-filter: blur(5px);
            display: flex;
            justify-content: space-between;
            align-items: center;
            padding: 0 16px;
            z-index: 1000;
            border-bottom: 1px solid rgba(226, 232, 240, 0.8);
        }
        
        .nav-title {
            font-size: 1.1rem;
            font-weight: 600;
        }
        
        .nav-action {
            color: var(--text-secondary);
            background: none;
            border: none;
            font-size: 1.2rem;
            width: 40px;
            height: 40px;
            border-radius: 50%;
            display: flex;
            align-items: center;
            justify-content: center;
        }
        
        .nav-action:hover {
            background-color: var(--bg-light);
        }
        
        /* 封面区域 */
        .cover-container {
            position: relative;
            height: 180px;
            overflow: hidden;
        }
        
        .cover-image {
            width: 100%;
            height: 100%;
            object-fit: cover;
        }
        
        .cover-overlay {
            position: absolute;
            bottom: 0;
            left: 0;
            right: 0;
            height: 80px;
            background: linear-gradient(transparent, rgba(0, 0, 0, 0.6));
        }
        
        /* 个人信息区域 */
        .profile-container {
            padding: 0 16px;
            margin-top: -50px;
            position: relative;
        }
        
        .avatar-container {
            display: flex;
            justify-content: space-between;
        }
        
        .user-avatar {
            width: 100px;
            height: 100px;
            border-radius: 50%;
            object-fit: cover;
            border: 4px solid var(--bg-white);
            box-shadow: var(--shadow);
        }
        
        .profile-actions {
            display: flex;
            gap: 10px;
            margin-top: 60px;
        }
        
        .action-button {
            padding: 8px 16px;
            border-radius: 8px;
            font-size: 0.9rem;
            font-weight: 500;
            display: flex;
            align-items: center;
            gap: 6px;
        }
        
        .primary-btn {
            background-color: var(--primary);
            color: white;
            border: none;
        }
        
        .secondary-btn {
            background-color: var(--bg-white);
            color: var(--text-primary);
            border: 1px solid var(--border-light);
        }
        
        .user-info {
            margin-top: 12px;
            text-align: center;
        }
        
        .user-name {
            font-size: 1.3rem;
            font-weight: 600;
            margin-bottom: 5px;
            display: flex;
            align-items: center;
            justify-content: center;
            gap: 8px;
        }
        
        .user-badges {
            display: flex;
            justify-content: center;
            gap: 6px;
            margin-bottom: 8px;
        }
        
        .user-badge {
            font-size: 0.75rem;
            padding: 2px 8px;
            border-radius: 12px;
            display: flex;
            align-items: center;
            gap: 4px;
        }
        
        .badge-primary {
            background-color: rgba(37, 99, 235, 0.1);
            color: var(--primary);
        }
        
        .badge-success {
            background-color: rgba(16, 185, 129, 0.1);
            color: var(--success);
        }
        
        .badge-secondary {
            background-color: rgba(249, 115, 22, 0.1);
            color: var(--secondary);
        }
        
        .user-meta {
            display: flex;
            justify-content: center;
            flex-wrap: wrap;
            gap: 12px;
            font-size: 0.85rem;
            color: var(--text-secondary);
            margin-bottom: 12px;
        }
        
        .meta-item {
            display: flex;
            align-items: center;
            gap: 4px;
        }
        
        /* 信誉资料卡 */
        .reputation-card {
            background-color: var(--bg-white);
            border-radius: var(--radius);
            padding: 16px;
            margin: 16px;
            box-shadow: var(--shadow);
            border: 1px solid var(--border-light);
        }
        
        .reputation-header {
            display: flex;
            justify-content: space-between;
            align-items: center;
            margin-bottom: 12px;
        }
        
        .reputation-title {
            font-size: 0.95rem;
            font-weight: 600;
        }
        
        .reputation-score {
            display: flex;
            align-items: center;
            gap: 6px;
        }
        
        .score-value {
            font-size: 1.4rem;
            font-weight: 700;
            color: var(--primary);
        }
        
        .score-stars {
            color: var(--warning);
        }
        
        .reputation-stats {
            display: flex;
            justify-content: space-around;
            text-align: center;
        }
        
        .stat-item {
            flex: 1;
        }
        
        .stat-value {
            font-size: 1.1rem;
            font-weight: 600;
            margin-bottom: 4px;
        }
        
        .stat-label {
            font-size: 0.8rem;
            color: var(--text-secondary);
        }
        
        /* 内容标签页 */
        .tabs-container {
            background-color: var(--bg-white);
            border-bottom: 1px solid var(--border-light);
        }
        
        .tabs {
            display: flex;
            overflow-x: auto;
            scrollbar-width: none;
        }
        
        .tabs::-webkit-scrollbar {
            display: none;
        }
        
        .tab-item {
            padding: 12px 20px;
            font-size: 0.95rem;
            font-weight: 500;
            color: var(--text-secondary);
            border-bottom: 2px solid transparent;
            white-space: nowrap;
        }
        
        .tab-item.active {
            color: var(--primary);
            border-bottom-color: var(--primary);
        }
        
        /* 个人介绍 */
        .profile-section {
            background-color: var(--bg-white);
            padding: 16px;
            margin-bottom: 12px;
        }
        
        .section-title {
            font-size: 0.95rem;
            font-weight: 600;
            margin-bottom: 12px;
            display: flex;
            align-items: center;
            gap: 8px;
        }
        
        .section-title i {
            color: var(--primary);
        }
        
        .intro-content {
            font-size: 0.9rem;
            line-height: 1.6;
            color: var(--text-primary);
            margin-bottom: 16px;
        }
        
        .info-grid {
            display: grid;
            grid-template-columns: repeat(2, 1fr);
            gap: 12px;
            margin-bottom: 16px;
        }
        
        .info-item {
            font-size: 0.85rem;
        }
        
        .info-label {
            color: var(--text-secondary);
            margin-bottom: 4px;
        }
        
        .info-value {
            color: var(--text-primary);
            font-weight: 500;
        }
        
        .tag-list {
            display: flex;
            flex-wrap: wrap;
            gap: 8px;
        }
        
        .profile-tag {
            padding: 5px 12px;
            background-color: var(--bg-light);
            border-radius: 20px;
            font-size: 0.8rem;
            color: var(--text-secondary);
        }
        
        /* 照片展示 */
        .photos-grid {
            display: grid;
            grid-template-columns: repeat(3, 1fr);
            gap: 4px;
        }
        
        .photo-item {
            aspect-ratio: 1;
            overflow: hidden;
            border-radius: 6px;
        }
        
        .photo-image {
            width: 100%;
            height: 100%;
            object-fit: cover;
            transition: transform 0.3s ease;
        }
        
        .photo-item:hover .photo-image {
            transform: scale(1.05);
        }
        
        /* 留言区 */
        .messages-section {
            background-color: var(--bg-white);
            padding: 16px;
        }
        
        .message-input-container {
            display: flex;
            gap: 8px;
            margin-bottom: 16px;
        }
        
        .message-avatar {
            width: 36px;
            height: 36px;
            border-radius: 50%;
            object-fit: cover;
        }
        
        .message-input-box {
            flex: 1;
            position: relative;
        }
        
        .message-input {
            width: 100%;
            padding: 10px 12px;
            border-radius: 20px;
            border: 1px solid var(--border-light);
            font-size: 0.9rem;
            background-color: var(--bg-light);
            resize: none;
            height: 40px;
        }
        
        .message-input:focus {
            outline: none;
            border-color: var(--primary-light);
        }
        
        .send-btn {
            position: absolute;
            right: 8px;
            top: 50%;
            transform: translateY(-50%);
            background-color: var(--primary);
            color: white;
            border: none;
            border-radius: 50%;
            width: 28px;
            height: 28px;
            display: flex;
            align-items: center;
            justify-content: center;
            font-size: 0.8rem;
        }
        
        .messages-list {
            margin-top: 16px;
        }
        
        .message-item {
            display: flex;
            gap: 10px;
            margin-bottom: 16px;
        }
        
        .message-content {
            flex: 1;
        }
        
        .message-header {
            display: flex;
            justify-content: space-between;
            margin-bottom: 4px;
            align-items: center;
        }
        
        .message-author {
            font-size: 0.85rem;
            font-weight: 500;
        }
        
        .message-time {
            font-size: 0.75rem;
            color: var(--text-secondary);
        }
        
        .message-text {
            background-color: var(--bg-light);
            padding: 8px 12px;
            border-radius: 10px;
            font-size: 0.85rem;
            position: relative;
        }
        
        .message-text::before {
            content: '';
            position: absolute;
            left: -8px;
            top: 8px;
            width: 0;
            height: 0;
            border-top: 8px solid transparent;
            border-right: 8px solid var(--bg-light);
            border-bottom: 8px solid transparent;
        }
        
        .message-actions {
            display: flex;
            gap: 12px;
            margin-top: 6px;
            margin-left: 46px;
        }
        
        .message-action {
            font-size: 0.75rem;
            color: var(--text-secondary);
            display: flex;
            align-items: center;
            gap: 4px;
        }
        
        /* 回复样式 */
        .reply-container {
            margin-left: 46px;
            margin-top: 10px;
            padding-left: 10px;
            border-left: 2px solid var(--border-light);
        }
        
        .reply-item {
            display: flex;
            gap: 8px;
            margin-bottom: 10px;
        }
        
        .reply-avatar {
            width: 30px;
            height: 30px;
            border-radius: 50%;
            object-fit: cover;
        }
        
        .reply-content {
            flex: 1;
        }
        
        .reply-header {
            display: flex;
            gap: 6px;
            margin-bottom: 3px;
        }
        
        .reply-author {
            font-size: 0.8rem;
            font-weight: 500;
        }
        
        .reply-to {
            font-size: 0.75rem;
            color: var(--text-secondary);
        }
        
        .reply-text {
            background-color: var(--bg-light);
            padding: 6px 10px;
            border-radius: 8px;
            font-size: 0.8rem;
        }
        
        /* 底部操作栏 */
        .bottom-action-bar {
            position: fixed;
            bottom: 0;
            left: 0;
            right: 0;
            height: 60px;
            background-color: var(--bg-white);
            display: flex;
            justify-content: space-around;
            align-items: center;
            border-top: 1px solid var(--border-light);
            z-index: 900;
        }
        
        .action-icon {
            display: flex;
            flex-direction: column;
            align-items: center;
            justify-content: center;
            color: var(--text-secondary);
            font-size: 0.7rem;
            gap: 4px;
        }
        
        .action-icon i {
            font-size: 1.2rem;
        }
        
        .action-icon.primary {
            color: var(--primary);
        }
        
        .action-icon.danger {
            color: var(--danger);
        }
        
        /* 加载更多 */
        .load-more {
            padding: 15px 0;
            text-align: center;
            font-size: 0.9rem;
            color: var(--primary);
        }
        
        .loading {
            display: inline-flex;
            align-items: center;
            gap: 8px;
        }
        
        .spinner {
            width: 16px;
            height: 16px;
            border: 2px solid rgba(37, 99, 235, 0.2);
            border-radius: 50%;
            border-top-color: var(--primary);
            animation: spin 1s linear infinite;
        }
        
        @keyframes spin {
            to { transform: rotate(360deg); }
        }
        
        /* 提示消息 */
        .toast {
            position: fixed;
            bottom: 80px;
            left: 50%;
            transform: translateX(-50%);
            background-color: rgba(0, 0, 0, 0.7);
            color: white;
            padding: 8px 16px;
            border-radius: 4px;
            z-index: 9999;
            font-size: 0.85rem;
            opacity: 0;
            transition: opacity 0.3s ease;
        }
        
        .toast.show {
            opacity: 1;
        }
    </style>
</head>
<body>
    <!-- 顶部导航 -->
    <div class="top-nav">
        <button class="nav-action" id="backBtn">
            <i class="fas fa-arrow-left"></i>
        </button>
        <div class="nav-title">个人详情</div>
        <button class="nav-action">
            <i class="fas fa-share-alt"></i>
        </button>
    </div>
    
    <!-- 封面区域 -->
    <div class="cover-container">
        <img src="https://picsum.photos/id/1039/800/400" alt="个人封面" class="cover-image">
        <div class="cover-overlay"></div>
    </div>
    
    <!-- 个人信息区域 -->
    <div class="profile-container">
        <div class="avatar-container">
            <img src="https://picsum.photos/id/64/200/200" alt="用户头像" class="user-avatar">
            <div class="profile-actions">
                <button class="action-button primary-btn" id="chatBtn">
                    <i class="fas fa-comment-dots"></i> 立即聊天
                </button>
                <button class="action-button secondary-btn" id="addFriendBtn">
                    <i class="fas fa-user-plus"></i> 加好友
                </button>
            </div>
        </div>
        
        <div class="user-info">
            <div class="user-name">
                林小雨 
                <i class="fas fa-female" style="color: #ec4899;"></i>
            </div>
            
            <div class="user-badges">
                <span class="user-badge badge-success">
                    <i class="fas fa-check"></i> 实名认证
                </span>
                <span class="user-badge badge-secondary">
                    <i class="fas fa-shield-alt"></i> 担保用户
                </span>
                <span class="user-badge badge-primary">
                    <i class="fas fa-video"></i> 视频认证
                </span>
            </div>
            
            <div class="user-meta">
                <div class="meta-item">
                    <i class="fas fa-calendar"></i> 26岁
                </div>
                <div class="meta-item">
                    <i class="fas fa-graduation-cap"></i> 本科
                </div>
                <div class="meta-item">
                    <i class="fas fa-briefcase"></i> 设计师
                </div>
                <div class="meta-item">
                    <i class="fas fa-map-marker-alt"></i> 1.2km
                </div>
            </div>
        </div>
    </div>
    
    <!-- 信誉资料卡 -->
    <div class="reputation-card">
        <div class="reputation-header">
            <div class="reputation-title">信誉资料</div>
            <div class="reputation-score">
                <span class="score-value">4.9</span>
                <div class="score-stars">
                    <i class="fas fa-star"></i>
                    <i class="fas fa-star"></i>
                    <i class="fas fa-star"></i>
                    <i class="fas fa-star"></i>
                    <i class="fas fa-star-half-alt"></i>
                </div>
            </div>
        </div>
        
        <div class="reputation-stats">
            <div class="stat-item">
                <div class="stat-value">128</div>
                <div class="stat-label">已完成交友</div>
            </div>
            <div class="stat-item">
                <div class="stat-value">0</div>
                <div class="stat-label">纠纷记录</div>
            </div>
            <div class="stat-item">
                <div class="stat-value">98%</div>
                <div class="stat-label">好评率</div>
            </div>
            <div class="stat-item">
                <div class="stat-value">5000</div>
                <div class="stat-label">担保金</div>
            </div>
        </div>
    </div>
    
    <!-- 内容标签页 -->
    <div class="tabs-container">
        <div class="tabs">
            <div class="tab-item active">个人介绍</div>
            <div class="tab-item">照片</div>
            <div class="tab-item">动态</div>
            <div class="tab-item">评价</div>
            <div class="tab-item">留言</div>
        </div>
    </div>
    
    <!-- 个人介绍 -->
    <div class="profile-section">
        <div class="section-title">
            <i class="fas fa-user"></i> 关于我
        </div>
        <div class="intro-content">
            大家好，我是林小雨，一名UI设计师。喜欢旅行、摄影和美食，周末经常去探店和看展。性格开朗随和，希望认识真诚的朋友，一起探索城市的美好。非诚勿扰哦~
        </div>
        
        <div class="section-title">
            <i class="fas fa-info-circle"></i> 基本信息
        </div>
        <div class="info-grid">
            <div class="info-item">
                <div class="info-label">性别</div>
                <div class="info-value">女</div>
            </div>
            <div class="info-item">
                <div class="info-label">生日</div>
                <div class="info-value">1998-05-12</div>
            </div>
            <div class="info-item">
                <div class="info-label">星座</div>
                <div class="info-value">金牛座</div>
            </div>
            <div class="info-item">
                <div class="info-label">职业</div>
                <div class="info-value">UI设计师</div>
            </div>
            <div class="info-item">
                <div class="info-label">学历</div>
                <div class="info-value">本科</div>
            </div>
            <div class="info-item">
                <div class="info-label">家乡</div>
                <div class="info-value">杭州</div>
            </div>
            <div class="info-item">
                <div class="info-label">现居</div>
                <div class="info-value">上海</div>
            </div>
            <div class="info-item">
                <div class="info-label">情感状态</div>
                <div class="info-value">单身</div>
            </div>
        </div>
        
        <div class="section-title">
            <i class="fas fa-heart"></i> 兴趣爱好
        </div>
        <div class="tag-list">
            <span class="profile-tag">摄影</span>
            <span class="profile-tag">旅行</span>
            <span class="profile-tag">美食</span>
            <span class="profile-tag">电影</span>
            <span class="profile-tag">展览</span>
            <span class="profile-tag">咖啡</span>
            <span class="profile-tag">阅读</span>
            <span class="profile-tag">设计</span>
        </div>
    </div>
    
    <!-- 照片展示 -->
    <div class="profile-section">
        <div class="section-title">
            <i class="fas fa-images"></i> 照片 (12)
        </div>
        <div class="photos-grid">
            <div class="photo-item">
                <img src="https://picsum.photos/id/112/300/300" alt="照片1" class="photo-image">
            </div>
            <div class="photo-item">
                <img src="https://picsum.photos/id/119/300/300" alt="照片2" class="photo-image">
            </div>
            <div class="photo-item">
                <img src="https://picsum.photos/id/133/300/300" alt="照片3" class="photo-image">
            </div>
            <div class="photo-item">
                <img src="https://picsum.photos/id/164/300/300" alt="照片4" class="photo-image">
            </div>
            <div class="photo-item">
                <img src="https://picsum.photos/id/237/300/300" alt="照片5" class="photo-image">
            </div>
            <div class="photo-item">
                <img src="https://picsum.photos/id/287/300/300" alt="照片6" class="photo-image">
            </div>
        </div>
    </div>
    
    <!-- 留言区 -->
    <div class="messages-section">
        <div class="section-title">
            <i class="fas fa-comments"></i> 留言板
        </div>
        
        <!-- 留言输入框 -->
        <div class="message-input-container">
            <img src="https://picsum.photos/id/91/100/100" alt="你的头像" class="message-avatar">
            <div class="message-input-box">
                <textarea class="message-input" placeholder="写下你的留言..."></textarea>
                <button class="send-btn" id="sendMessageBtn">
                    <i class="fas fa-paper-plane"></i>
                </button>
            </div>
        </div>
        
        <!-- 留言列表 -->
        <div class="messages-list">
            <!-- 留言1 -->
            <div class="message-item">
                <img src="https://picsum.photos/id/91/100/100" alt="用户头像" class="message-avatar">
                <div class="message-content">
                    <div class="message-header">
                        <div class="message-author">张明</div>
                        <div class="message-time">3天前</div>
                    </div>
                    <div class="message-text">
                        你好，看到你也喜欢摄影，最近有个很棒的摄影展，有兴趣一起去吗？
                    </div>
                    <div class="message-actions">
                        <div class="message-action reply-btn">
                            <i class="fas fa-reply"></i> 回复
                        </div>
                        <div class="message-action like-btn">
                            <i class="far fa-thumbs-up"></i> 点赞 (5)
                        </div>
                    </div>
                    
                    <!-- 回复 -->
                    <div class="reply-container">
                        <div class="reply-item">
                            <img src="https://picsum.photos/id/64/100/100" alt="回复者头像" class="reply-avatar">
                            <div class="reply-content">
                                <div class="reply-header">
                                    <div class="reply-author">林小雨</div>
                                    <div class="reply-to">回复 张明</div>
                                </div>
                                <div class="reply-text">
                                    你好呀！是哪个摄影展呢？我最近刚好有空~
                                </div>
                            </div>
                        </div>
                        
                        <div class="reply-item">
                            <img src="https://picsum.photos/id/91/100/100" alt="回复者头像" class="reply-avatar">
                            <div class="reply-content">
                                <div class="reply-header">
                                    <div class="reply-author">张明</div>
                                    <div class="reply-to">回复 林小雨</div>
                                </div>
                                <div class="reply-text">
                                    是当代艺术中心的那个纪实摄影展，周末一起去吗？
                                </div>
                            </div>
                        </div>
                    </div>
                </div>
            </div>
            
            <!-- 留言2 -->
            <div class="message-item">
                <img src="https://picsum.photos/id/65/100/100" alt="用户头像" class="message-avatar">
                <div class="message-content">
                    <div class="message-header">
                        <div class="message-author">王小红</div>
                        <div class="message-time">1周前</div>
                    </div>
                    <div class="message-text">
                        同为设计师，握个手！你的作品很有创意，希望有机会可以交流一下设计心得~
                    </div>
                    <div class="message-actions">
                        <div class="message-action reply-btn">
                            <i class="fas fa-reply"></i> 回复
                        </div>
                        <div class="message-action like-btn">
                            <i class="far fa-thumbs-up"></i> 点赞 (8)
                        </div>
                    </div>
                    
                    <!-- 回复 -->
                    <div class="reply-container">
                        <div class="reply-item">
                            <img src="https://picsum.photos/id/64/100/100" alt="回复者头像" class="reply-avatar">
                            <div class="reply-content">
                                <div class="reply-header">
                                    <div class="reply-author">林小雨</div>
                                    <div class="reply-to">回复 王小红</div>
                                </div>
                                <div class="reply-text">
                                    谢谢夸奖！很高兴认识同行，改天可以约个咖啡聊聊~
                                </div>
                            </div>
                        </div>
                    </div>
                </div>
            </div>
            
            <!-- 留言3 -->
            <div class="message-item">
                <img src="https://picsum.photos/id/54/100/100" alt="用户头像" class="message-avatar">
                <div class="message-content">
                    <div class="message-header">
                        <div class="message-author">赵阳</div>
                        <div class="message-time">2周前</div>
                    </div>
                    <div class="message-text">
                        看你喜欢美食，我最近发现一家很棒的西餐厅，主厨做的牛排超赞，有兴趣一起去尝尝吗？
                    </div>
                    <div class="message-actions">
                        <div class="message-action reply-btn">
                            <i class="fas fa-reply"></i> 回复
                        </div>
                        <div class="message-action like-btn">
                            <i class="far fa-thumbs-up"></i> 点赞 (3)
                        </div>
                    </div>
                </div>
            </div>
        </div>
        
        <!-- 加载更多 -->
        <div class="load-more">
            <div class="loading">
                <div class="spinner"></div>
                <span>加载更多留言</span>
            </div>
        </div>
    </div>
    
    <!-- 底部操作栏 -->
    <div class="bottom-action-bar">
        <div class="action-icon danger" id="reportBtn">
            <i class="fas fa-flag"></i>
            <span>举报</span>
        </div>
        <div class="action-icon" id="shareBtn">
            <i class="fas fa-share-alt"></i>
            <span>分享</span>
        </div>
        <div class="action-icon" id="favoriteBtn">
            <i class="far fa-heart"></i>
            <span>收藏</span>
        </div>
        <div class="action-icon" id="likeBtn">
            <i class="far fa-thumbs-up"></i>
            <span>点赞</span>
        </div>
    </div>
    
    <!-- 提示消息元素 -->
    <div class="toast" id="toast"></div>
    
    <!-- Bootstrap JS Bundle with Popper -->
    <script src="https://cdn.jsdelivr.net/npm/bootstrap@5.3.2/dist/js/bootstrap.bundle.min.js"></script>
    
    <script>
        // 标签页切换
        document.querySelectorAll('.tab-item').forEach(tab => {
            tab.addEventListener('click', function() {
                document.querySelectorAll('.tab-item').forEach(t => t.classList.remove('active'));
                this.classList.add('active');
                
                // 在实际应用中，这里会根据标签切换显示不同内容
                showToast(`切换到${this.textContent}标签`);
            });
        });
        
        // 发送留言
        document.getElementById('sendMessageBtn').addEventListener('click', function() {
            const input = document.querySelector('.message-input');
            const message = input.value.trim();
            
            if (message) {
                showToast('留言发送成功');
                input.value = '';
                
                // 实际应用中这里会提交留言并刷新列表
            } else {
                showToast('请输入留言内容');
            }
        });
        
        // 回复按钮
        document.querySelectorAll('.reply-btn').forEach(btn => {
            btn.addEventListener('click', function() {
                const author = this.closest('.message-content').querySelector('.message-author').textContent;
                document.querySelector('.message-input').value = `回复 @${author}：`;
                document.querySelector('.message-input').focus();
            });
        });
        
        // 点赞按钮
        document.querySelectorAll('.like-btn').forEach(btn => {
            btn.addEventListener('click', function() {
                const icon = this.querySelector('i');
                const isLiked = icon.classList.contains('fas');
                
                if (isLiked) {
                    // 取消点赞
                    icon.classList.remove('fas', 'text-primary');
                    icon.classList.add('far');
                    
                    // 更新点赞数
                    let countText = this.textContent.trim();
                    let count = parseInt(countText.match(/\d+/)[0]);
                    this.innerHTML = '<i class="far fa-thumbs-up"></i> 点赞 (' + (count - 1) + ')';
                } else {
                    // 点赞
                    icon.classList.remove('far');
                    icon.classList.add('fas', 'text-primary');
                    
                    // 更新点赞数
                    let countText = this.textContent.trim();
                    let count = countText.match(/\d+/) ? parseInt(countText.match(/\d+/)[0]) : 0;
                    this.innerHTML = '<i class="fas fa-thumbs-up text-primary"></i> 点赞 (' + (count + 1) + ')';
                }
            });
        });
        
        // 底部操作按钮
        document.getElementById('favoriteBtn').addEventListener('click', function() {
            const icon = this.querySelector('i');
            if (icon.classList.contains('far')) {
                icon.classList.remove('far');
                icon.classList.add('fas');
                this.classList.add('primary');
                showToast('已收藏');
            } else {
                icon.classList.remove('fas');
                icon.classList.add('far');
                this.classList.remove('primary');
                showToast('已取消收藏');
            }
        });
        
        document.getElementById('likeBtn').addEventListener('click', function() {
            const icon = this.querySelector('i');
            if (icon.classList.contains('far')) {
                icon.classList.remove('far');
                icon.classList.add('fas');
                this.classList.add('primary');
                showToast('已点赞');
            } else {
                icon.classList.remove('fas');
                icon.classList.add('far');
                this.classList.remove('primary');
                showToast('已取消点赞');
            }
        });
        
        document.getElementById('shareBtn').addEventListener('click', function() {
            showToast('分享成功');
        });
        
        document.getElementById('reportBtn').addEventListener('click', function() {
            if (confirm('确定要举报该用户吗？')) {
                showToast('举报已提交，我们会尽快处理');
            }
        });
        
        // 聊天和加好友按钮
        document.getElementById('chatBtn').addEventListener('click', function() {
            showToast('正在进入聊天界面...');
        });
        
        document.getElementById('addFriendBtn').addEventListener('click', function() {
            showToast('好友请求已发送');
        });
        
        // 返回按钮
        document.getElementById('backBtn').addEventListener('click', function() {
            history.back();
        });
        
        // 提示消息功能
        function showToast(message) {
            const toast = document.getElementById('toast');
            toast.textContent = message;
            toast.classList.add('show');
            
            setTimeout(() => {
                toast.classList.remove('show');
            }, 2000);
        }
        
        // 照片点击查看大图
        document.querySelectorAll('.photo-item').forEach(item => {
            item.addEventListener('click', function() {
                const imgSrc = this.querySelector('.photo-image').src;
                showToast('查看大图功能');
                // 实际应用中这里会打开图片查看器
            });
        });
    </script>
</body>
</html>

